/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gps.decoder;

import pe.gps.record.Record;
import java.nio.ByteBuffer;
import java.util.List;

/**
 *
 * @author john
 */
public abstract class Decoder {

    protected int id;
    protected String imei;
    protected boolean blq;
    protected boolean jmg;
//    protected RecordPosicion posicion;
//    protected RecordEstado estado;
//    protected RecordAlarma alarma;
    protected int state = 0;
    protected Record record;
    protected List<Record> records;
    
    public static int CO_BLOQUEO = 1;

    public abstract void decode(ByteBuffer buffer);
    public abstract List<Record> decoder(ByteBuffer buffer);
    public abstract List<Record> decoderIMEI(ByteBuffer buffer);//NEW
    public abstract ByteBuffer response();
    public abstract String toString();
        
    public int getState(){
        return state;
    }

    public Record getRecord() {
        return record;
    }

    public List<Record> getRecords() {
        return records;
    }
    
    public String getImei() {
        return imei;
    }

    public boolean isBlq() {
        return blq;
    }

    public boolean isJmg() {
        return jmg;
    }
}
